home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / DriverFamilyMatching.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  5.5 KB  |  175 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        DriverFamilyMatching.p
  3.  
  4.      Contains:    xxx put contents here xxx
  5.  
  6.      Version:    Technology:    
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1995-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT DriverFamilyMatching;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __DRIVERFAMILYMATCHING__}
  28. {$SETC __DRIVERFAMILYMATCHING__ := 1}
  29.  
  30. {$I+}
  31. {$SETC DriverFamilyMatchingIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __NAMEREGISTRY__}
  38. {$I NameRegistry.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __CODEFRAGMENTS__}
  41. {$I CodeFragments.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49. {
  50.   ##############################################
  51.    Well known properties in the Name Registry
  52.   ##############################################
  53. }
  54. { CPassThru }
  55. {
  56.   #########################################################
  57.    Descriptor for Drivers and NDRVs
  58.   #########################################################
  59. }
  60. { Driver Typing Information Used to Match Drivers With Devices }
  61.  
  62. TYPE
  63.     DriverTypePtr = ^DriverType;
  64.     DriverType = RECORD
  65.         nameInfoStr:            Str31;                                    {  Driver Name/Info String }
  66.         version:                NumVersion;                                {  Driver Version Number }
  67.     END;
  68.  
  69. { OS Runtime Information Used to Setup and Maintain a Driver's Runtime Environment }
  70.     RuntimeOptions                        = OptionBits;
  71.  
  72. CONST
  73.     kDriverIsLoadedUponDiscovery = $00000001;                    {  auto-load driver when discovered }
  74.     kDriverIsOpenedUponLoad        = $00000002;                    {  auto-open driver when loaded }
  75.     kDriverIsUnderExpertControl    = $00000004;                    {  I/O expert handles loads/opens }
  76.     kDriverIsConcurrent            = $00000008;                    {  supports concurrent requests }
  77.     kDriverQueuesIOPB            = $00000010;                    {  device manager doesn't queue IOPB }
  78.     kDriverIsLoadedAtBoot        = $00000020;                    {  Driver is loaded at the boot time  }
  79.     kDriverIsForVirtualDevice    = $00000040;                    {  Driver is for a virtual Device  }
  80.     kDriverSupportDMSuspendAndResume = $00000080;                {  Driver supports Device Manager Suspend and Resume command  }
  81.  
  82.  
  83. TYPE
  84.     DriverOSRuntimePtr = ^DriverOSRuntime;
  85.     DriverOSRuntime = RECORD
  86.         driverRuntime:            RuntimeOptions;                            {  Options for OS Runtime }
  87.         driverName:                Str31;                                    {  Driver's name to the OS }
  88.         driverDescReserved:        ARRAY [0..7] OF UInt32;                    {  Reserved area }
  89.     END;
  90.  
  91. { OS Service Information Used To Declare What APIs a Driver Supports }
  92.     ServiceCount                        = UInt32;
  93.     DriverServiceInfoPtr = ^DriverServiceInfo;
  94.     DriverServiceInfo = RECORD
  95.         serviceCategory:        OSType;                                    {  Service Category Name }
  96.         serviceType:            OSType;                                    {  Type within Category }
  97.         serviceVersion:            NumVersion;                                {  Version of service }
  98.     END;
  99.  
  100.     DriverOSServicePtr = ^DriverOSService;
  101.     DriverOSService = RECORD
  102.         nServices:                ServiceCount;                            {  Number of Services Supported }
  103.         service:                ARRAY [0..0] OF DriverServiceInfo;        {  The List of Services (at least one) }
  104.     END;
  105.  
  106. { Categories }
  107.  
  108. CONST
  109.     kServiceCategoryDisplay        = 'disp';                        {  Display Manager }
  110.     kServiceCategoryOpenTransport = 'otan';                        {  Open Transport }
  111.     kServiceCategoryBlockStorage = 'blok';                        {  Block Storage }
  112.     kServiceCategoryNdrvDriver    = 'ndrv';                        {  Generic Native Driver }
  113.     kServiceCategoryScsiSIM        = 'scsi';                        {  SCSI  }
  114.     kServiceCategoryFileManager    = 'file';                        {  File Manager  }
  115.     kServiceCategoryIDE            = 'ide-';                        {  ide  }
  116.     kServiceCategoryADB            = 'adb-';                        {  adb  }
  117.     kServiceCategoryPCI            = 'pci-';                        {  pci bus  }
  118.                                                                 {  Nu Bus  }
  119.     kServiceCategoryDFM            = 'dfm-';                        {  DFM  }
  120.     kServiceCategoryMotherBoard    = 'mrbd';                        {  mother Board  }
  121.     kServiceCategoryKeyboard    = 'kybd';                        {  Keyboard  }
  122.     kServiceCategoryPointing    = 'poit';                        {  Pointing  }
  123.     kServiceCategoryRTC            = 'rtc-';                        {  RTC  }
  124.     kServiceCategoryNVRAM        = 'nram';                        {  NVRAM  }
  125.     kServiceCategorySound        = 'sond';                        {  Sound (1/3/96 MCS)  }
  126.     kServiceCategoryPowerMgt    = 'pgmt';                        {  Power Management  }
  127.     kServiceCategoryGeneric        = 'genr';                        {  Generic Service Category to receive general Events  }
  128.  
  129. { Ndrv ServiceCategory Types }
  130.     kNdrvTypeIsGeneric            = 'genr';                        {  generic }
  131.     kNdrvTypeIsVideo            = 'vido';                        {  video }
  132.     kNdrvTypeIsBlockStorage        = 'blok';                        {  block storage }
  133.     kNdrvTypeIsNetworking        = 'netw';                        {  networking }
  134.     kNdrvTypeIsSerial            = 'serl';                        {  serial }
  135.     kNdrvTypeIsParallel            = 'parl';                        {  parallel  }
  136.     kNdrvTypeIsSound            = 'sond';                        {  sound }
  137.     kNdrvTypeIsBusBridge        = 'brdg';
  138.  
  139.  
  140. TYPE
  141.     DriverDescVersion                    = UInt32;
  142. {    The Driver Description }
  143.  
  144. CONST
  145.     kInitialDriverDescriptor    = 0;
  146.     kVersionOneDriverDescriptor    = 1;
  147.  
  148.     kTheDescriptionSignature    = 'mtej';
  149.     kDriverDescriptionSignature    = 'pdes';
  150.  
  151.  
  152.  
  153. TYPE
  154.     DriverDescriptionPtr = ^DriverDescription;
  155.     DriverDescription = RECORD
  156.         driverDescSignature:    OSType;                                    {  Signature field of this structure }
  157.         driverDescVersion:        DriverDescVersion;                        {  Version of this data structure }
  158.         driverType:                DriverType;                                {  Type of Driver }
  159.         driverOSRuntimeInfo:    DriverOSRuntime;                        {  OS Runtime Requirements of Driver }
  160.         driverServices:            DriverOSService;                        {  Apple Service API Membership }
  161.     END;
  162.  
  163.  
  164.  
  165. {$ALIGN RESET}
  166. {$POP}
  167.  
  168. {$SETC UsingIncludes := DriverFamilyMatchingIncludes}
  169.  
  170. {$ENDC} {__DRIVERFAMILYMATCHING__}
  171.  
  172. {$IFC NOT UsingIncludes}
  173.  END.
  174. {$ENDC}
  175.